package com.mbc.hr.entities;

import java.io.Serializable;

import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import javax.persistence.Id;
import javax.persistence.NamedQueries;
import javax.persistence.NamedQuery;
import javax.persistence.Table;

@SuppressWarnings("serial")
@Entity
@Table(name="HR_CalendarEventParticipant")
@NamedQueries({
	@NamedQuery(name="CalendarEventParticipant.findAll",query="SELECT cp FROM CalendarEventParticipant cp WHERE cp.eventID = :eventID AND cp.userId = :userId"),
	@NamedQuery(name="CalendarEventParticipant.deleteByEventID",query="DELETE FROM CalendarEventParticipant cp WHERE cp.eventID = :eventID"),
	@NamedQuery(name="CalendarEventParticipant.updateEditable",query="UPDATE CalendarEventParticipant cp SET cp.editable = :editable WHERE cp.eventID = :eventID")
})
public class CalendarEventParticipant implements Serializable {

	@Id
	@GeneratedValue(strategy=GenerationType.IDENTITY)
	private long autokey;
	private Long eventID;
	private Long userId;
	private String participant;
	private boolean editable;

	public long getAutokey() {
		return autokey;
	}

	public void setAutokey(long autokey) {
		this.autokey = autokey;
	}

	public Long getEventID(){
		return eventID;
	}

	public void setEventID(Long eventID){
		this.eventID = eventID;
	}

	public Long getUserId(){
		return userId;
	}

	public void setUserId(Long userId){
		this.userId = userId;
	}

	public String getParticipant(){
		return participant;
	}

	public void setParticipant(String participant){
		this.participant = participant;
	}

	public boolean isEditable() {
		return editable;
	}

	public void setEditable(boolean ediable) {
		this.editable = ediable;
	}


}
